<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>		
		<title>网络教学系统首页</title>
		<META content="Fabian" name="author">
		<LINK rel="shortcut icon" href="favicon.ico" />
		<META http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link rel="stylesheet" type="text/css" href="EXT/resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />	
		<link rel="stylesheet" type="text/css" href="EXT/resources/css/plugin/file-upload.css" /> 
	</head>
	<body>
		<%-- 加载时候的显示信息 --%>
		<div id="loading-mask" style=""></div>
		<div id="loading">
		    <div class="loading-indicator">
		    	<img src="images/lms.jpg" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;"/>
		    	欢迎使用安理工电信学院网络教学系统<br/>
		    	<span id="loading-msg">Loading styles and images...</span>
		    </div>
		</div>

		<%-- 加载库文件和CSS样式文件 --%>
		<script type="text/javascript">
			document.getElementById('loading-msg').innerHTML = '加载ExtJS核心API...';
		</script>
		<script type="text/javascript" src="EXT/ext-base.js"></script>
		<script type="text/javascript">
			document.getElementById('loading-msg').innerHTML = '加载ExtJS的UI组件...';
		</script>
		<script type="text/javascript" src="EXT/ext-all.js"></script>			
		<script type="text/javascript" src="EXT/plugin/RowExpander.js"></script>
		<script type="text/javascript" src="EXT/ext-lang-zh_CN.js"></script>	
		<script type="text/javascript">
			document.getElementById('loading-msg').innerHTML = '加载AUST_LMS核心JS代码...';
		</script>	
		<%
			//判断学生还是老师，加载不同的js
			int role = (Integer)request.getAttribute("role");		
			if (role == 1) {	 		//管理员    
		%>
			<script type="text/javascript" src="js/manager/main.js"></script>	
			<script type="text/javascript" src="js/manager/common_fn.js"></script>	
			<script type="text/javascript" src="js/manager/teacher_mgr.js"></script>
			<script type="text/javascript" src="js/manager/student_mgr.js"></script>	
			<script type="text/javascript" src="js/manager/self_mgr.js"></script>	
			<script type="text/javascript" src="js/manager/suggest_mgr.js"></script>		
		<%	
			} else if (role == 2) {		//老师 
		%>
			<script type="text/javascript" src="EXT/plugin/FileUploadField.js"></script>
			<script type="text/javascript" src="js/teacher/main.js"></script>			
			<script type="text/javascript" src="js/teacher/common_fn.js"></script>			
			<script type="text/javascript" src="js/teacher/interact_part.js"></script>
			<script type="text/javascript" src="js/teacher/learn_res_mgr.js"></script>
			<script type="text/javascript" src="js/teacher/homework_mgr.js"></script>
			<script type="text/javascript" src="js/teacher/notice_mgr.js"></script>
			<script type="text/javascript" src="js/teacher/self_mgr.js"></script>
		<%
			} else if (role == 3) {		//学生	
		%>
			<script type="text/javascript" src="EXT/plugin/FileUploadField.js"></script>
			<script type="text/javascript" src="js/student/main.js"></script>	
			<script type="text/javascript" src="js/student/common_fn.js"></script>
			<script type="text/javascript" src="js/student/interact_part.js"></script>
			<script type="text/javascript" src="js/student/learn_res_mgr.js"></script>
			<script type="text/javascript" src="js/student/homework_mgr.js"></script>
			<script type="text/javascript" src="js/student/self_mgr.js"></script>
		<%
			}
		%>
		<script type="text/javascript">
			//去除蒙板
			Ext.get('loading-mask').remove();
			//去除loading显示区			
			Ext.get('loading').remove();
		</script>	
		
		<%-- 主体部分 --%>
		<div id="viewport">
			<%-- 上北 --%>
			<div id="north">
				<p>
					<%@ include file="inc/top.jsp" %>
				</p>
			</div>
			<%-- 左西 --%>
			<div id="west">
				<div id="tree1"></div>
				<div id="tree2"></div>
				<div id="tree3"></div>
				<div id="tree4"></div>
				<div id="tree5"></div>
			</div>	
			<%-- 右东 --%>
			<div id="east">
				<div id="treeOne"></div>
				<div id="treeTwo"></div>
			</div>	
			<%-- 中中 --%>
			<div id="center">
				<div id="home" align="center">
					<img src="images/main/bg.jpg">		
				</div>
			</div>	
			<%-- 下南 --%>		
			<div id="south">
				<p>
					<%@ include file="inc/footer.jsp" %>
				</p>
			</div>
		</div>
	</body>
</html>
